import Vue from 'vue'
import './plugins/axios'
import axios from 'axios'
import App from './App.vue'
import router from './router'
// element插件
import './plugins/element.js'
// 全局样式表
import './assets/css/global.css'
// 字体图标
import './assets/fonts/iconfont.css'
// 配置请求路径
Vue.prototype.$http = axios
axios.defaults.baseURL = 'http://39.99.186.24:30119/platform'
// axios.defaults.baseURL = 'http://127.0.0.1:8888/api.private/v1/'

// 请求头设置
axios.interceptors.request.use(config => {
  // 设置
  config.headers.Authorization = window.sessionStorage.getItem('token');
  // 回调  
  return config
},
  error => {
    return Promise.error(error)
  }
)


Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
